-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Rework to be proper abstraction of a SecretStore and add SecretStoreClient from edgex-go #91
refactor: Rework to be proper abstraction of a SecretStore and add SecretStoreClient from edgex-go #91
Conversation
886854b
to
7a84eec
Compare
No longer leak that Vault is the only implementation Added `Type` to the configuration and factory method, so it will error if not set Move SecretStoreClient from edgex-go in to this abstraction and added the `EnableConsulSecretEngine` interface needed for `Secure Consul` Now have to interfaces that the vault wrapper implements, which are SecretsClient & SecretStoreClient closes #87 BREAKING CHANGE: All existing SecretStore configuration must add `Type = 'vault'` Signed-off-by: lenny <[email protected]>
7a84eec
to
89b3b67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. Some suggestions to change. Also, I've created secretengine.enabler like factory method to be hooked with secretstore-setup
, should that part be in here or you prefer to leave it to the edgex-go level?
@jim-wang-intel , I don't understand the need for it, but it doesn't belong in this abstraction. So if really needed, then stays in edgex-go. |
Ok, I'll leave it at edgex-go level, thanks! |
Signed-off-by: lenny <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
===========================================
+ Coverage 59.31% 80.32% +21.01%
===========================================
Files 8 16 +8
Lines 349 742 +393
===========================================
+ Hits 207 596 +389
+ Misses 131 101 -30
- Partials 11 45 +34
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close: a couple of suggestions and typo change.
Signed-off-by: lenny <[email protected]>
Signed-off-by: lenny <[email protected]>
ba68a1b
to
f998050
Compare
Signed-off-by: lenny <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
recheck |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #87
What is the new behavior?
No longer leak that Vault is the only implementation
Added
Type
to the configuration and factory method, so it will error if not setMove SecretStoreClient from edgex-go in to this abstraction and added the
EnableConsulSecretEngine
interface needed forSecure Consul
Now have to interfaces that the vault wrapper implements, which are SecretsClient & SecretStoreClient
SecretStoreClient code originated from here: https://github.com/edgexfoundry/edgex-go/tree/master/internal/security/secretstoreclient.
Does this PR introduce a breaking change?
BREAKING CHANGE: All existing SecretStore configuration must add
Type = 'vault'
Are there any new imports or modules? If so, what are they used for and why?
no
Are there any specific instructions or things that should be known prior to reviewing?
Other information